package com.liuxing.javaSpringBoot.modules.account.service;

import com.github.pagehelper.PageInfo;
import com.liuxing.javaSpringBoot.modules.account.entity.User;
import com.liuxing.javaSpringBoot.modules.common.entity.Result;
import com.liuxing.javaSpringBoot.modules.common.entity.SearchBean;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * @File UserService.java
 * @Auth liuxing
 * @Date 2021/8/22 10:35
 * @Email liuxing997@foxmail.com
 */
public interface UserService {

    //用户登录
    Result<User> login(User user);

    //用户登出
    Result<Object> logout();

    //添加用户信息
    Result<User> insertUser(User user);

    //根据用户名查询用户信息
    User getUserByUsername(String name);

    //根据用户ID修改用户信息
    Result<User> updateUserById(User user);

    //根据用户ID删除用户
    Result<Object> deleteUserByUserId(int id);

    //根据用户ID查询用户
    User getUserByUserId(int id);

    //查询所有用户信息
    List<User> getAllUser();

    //批量插入用户信息
    Result<Object> insertUsers(List<User> users);

    //分页查询用户信息
    PageInfo<User> getUsersBySearchBean(SearchBean searchBean);
}
